<template>
	<view>
		<view class="pad-lr-16 mar-top-16">
			<view class="bgfff radius-16 pad-lr-24 pad-tb-24 display-sb align-items">
				<view>入股本金：{{shareholder?.put_money||0}}</view>
				<view>应返金额：{{shareholder?.refund_money||0}}</view>
				<view>已返金额：{{shareholder?.already_refund_money||0}}</view>
			</view>
			<view class="mar-top-16 radius-16 bgfff pad-lr-24 over-hid">
				<view class="fontSize-32 fontBold mar-top-32">返还明细</view>
				<view class="pad-tb-32 border_bottom_F1 display-sb" v-for="item in List" :key="item.id">
					<view class="">
						<view class="fontSize-28">{{item.type_text}}</view>
						<view class="mar-top-10 fontSize-26 col-9">{{item.create_time_text}}</view>
					</view>
					<view class="fontSize-32 fontBold">{{item.money}}</view>
				</view>
				<view class="display-ce align-items" v-if="List.length==0">
					<tm-result :showBtn="false" subTitle=" " title="暂无数据" color="#bc8c1e"></tm-result>
				</view>
			</view>
		</view>
	</view>
</template>

<script lang="ts" setup>
import { onLoad } from '@dcloudio/uni-app';
import {user,moneyLog} from '@/utils/api'
import { ref } from 'vue';
onLoad(()=>{
	_user_info()
	_moneyLog()
})
const shareholder=ref()
const _user_info =() =>{
	user().then(res=>{
		if(res.code==1){
			shareholder.value = res.data.shareholder
		}
	})
}
const page = ref(1)
const List = ref([])
const _moneyLog=()=>{
	moneyLog({page:page.value,limit:20,type:10}).then(res=>{
		if(res.code==1){
			List.value = List.value.concat(res.data.money_log.data)
		}
	})
}
</script>

<style lang="scss">
page{
	background-color: #f6f6f6;
}
.bgC9951C{
	background-color: #C9951C;
}
</style>
